<template>
  <div>
    <svg :style="{ width, height }">
      <!-- xlink-href指定用哪一个图标 -->
      <use :xlink:href="prefix + name" :fill="color"></use>
    </svg>
  </div>
</template>
<script lang="ts" setup>
defineProps({
  //前缀
  prefix: {
    type: String,
    default: '#icon-',
  },
  //名字
  name: String,
  //颜色
  color: {
    type: String,
    default: '',
  },
  width: {
    type: String,
    default: '16px',
  },
  height: {
    type: String,
    default: '16px',
  },
})
</script>
<style></style>
